<?php $this->context->layout = 'fullout'; ?>
    <div style="display: flex">
<?=$this->params['leftHtml']?>
    <div  style="width: 89.7%">
        <div class="ui-layout-center">
            <div class="container-div">
                <div class="layui-card-body" style="padding: 10px 0px">
                    <div class="layui-collapse like-layui-collapse" lay-accordion=""
                         style="border:1px dashed #c4c4c4">
                        <div class="layui-colla-item">
                            <h2 class="layui-colla-title like-layui-colla-title" style="background-color: #fff">操作提示<i
                                        class="layui-icon layui-colla-icon"></i></h2>
                            <div class="layui-colla-content layui-show" style="background-color: #fff">
                                <p>*排序规则：<span style="color: red">排序</span>值越大越靠前。</p>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-12 search-collapse">
                        <form id="role-form">
                            <div class="select-list">
                                <ul>
                                    <li><?= \common\widgets\FormInput::widget(['name' => 'input|名称', 'extend' => ['name' => 'like[name]']]) ?></li>
                                    <li><?= \common\widgets\FormInput::widget(['name' => 'select|状态', 'extend' => ['name' => 'where[status]', 'value' => '', 'place' => '所有']]) ?></li>
                                    <li>
                                        <?= $this->render('/iframe', ['name' => 'searchbtn|搜索']) ?>
                                        <?= $this->render('/iframe', ['name' => 'resetbtn|重置']) ?>
                                    </li>
                                </ul>
                            </div>
                        </form>
                    </div>
                    <div class="btn-group-sm" id="toolbar" role="group">
                        <?= $this->render('/iframe', ['name' => 'addbtn']) ?>
                        <?= $this->render('/iframe', ['name' => 'editbtn']) ?>
                    </div>
                    <div class="col-sm-12 select-table table-striped">
                        <table id="bootstrap-table"></table>
                    </div>
                </div>
            </div>
        </div>
    </div>
<?php $this->beginBlock('script'); ?>
    <script>
        getUserList();
        function getUserList() {
            var options = {
                modalName: "VIP",
                sortName:'sort',
                sortOrder: "desc",
                columns: [
                    {checkbox: true},
                    {field: 'id', title: 'ID', align: 'center', sortable: true},
                    { title: '名称',field: 'title',align: 'center' },
                    { title: '天',field: 'days',align: 'center' },
                    { title: '金额',field: 'amount',align: 'center' },
                    {
                        field: "sort",
                        title: "排序",
                        sortable: true,
                        formatter: function (value, row, index) {
                            return value;
                        }
                    },
                    {
                        title: '状态',
                        field: 'status',
                        align: 'center',
                        formatter: function (value, row, index) {
                            return $.view.statusTools(row, true);
                        }
                    },
                    {field: 'create_time', title: '创建时间', align: 'center', sortable: true},
                    {
                        title: '操作',
                        align: 'center',
                        formatter: function (value, row, index) {
                            return '<?=$this->render("/iframe", ["name" => "formopbtn", "extend" => ["type" => ["edit", "delete"], "rowId" => "row.id"]])?>';
                        }
                    }
                ],
            };
            $.table.init(options);
        }
    </script>
<?php $this->endBlock(); ?>